// MyGame.cpp: implementation of the CMyGame class.
//
//////////////////////////////////////////////////////////////////////
#include "stdafx.h"
#include "Game.h"
#include "System/NDSFile.h"

CGame * g_pGame = NULL;

CGame * CGame::GetGame()
{
	return g_pGame;
}

CGame::CGame()
{
	g_pGame = this;	
	m_bPaused = false;
	m_bCheatOpen = true;


}

CGame::~CGame()
{	
	OnDestroy();
	g_pGame = NULL;
}

void CGame::OnDestroy()
{	

}
void CGame::OnInitialize()
{
	m_pPad = NEW CPad();
}



void CGame::Pause()
{
	m_bPaused = true;
	
}

void CGame::Resume()
{	
	m_bPaused = false;
	
}


void CGame::OnMainLoop()
{
	m_pDevice->BeginScene();
	m_pDevice->EndScene();	
}

void CGame::OnKeyClick(int nKeyCode, bool bDown)
{

}

bool CGame::IsAnyKeyPressed()
{
	return m_pPad->IsAnyKeyPressed();
}

bool CGame::IsKeyPressed(int nKeyCode)
{
	return m_pPad->IsKeyPressed(nKeyCode);
}

bool CGame::IsKeyHold(int nKeyCode)
{
	return m_pPad->IsKeyHold(nKeyCode);
}

bool CGame::IsKeyReleased(int nKeyCode)
{
	return m_pPad->IsKeyReleased(nKeyCode);
}

void CGame::ClearKeyPress()
{
	m_pPad->ClearKeyPress();
}


